Integrand size = 18, antiderivative size = 274 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=-\frac {2 i b^2 x^{3/2}}{d}+\frac {a^2 x^2}{2}+i a b x^2-\frac {b^2 x^2}{2}+\frac {6 b^2 x \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {6 i b^2 \sqrt {x} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {6 i a b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {3 b^2 \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {6 a b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i a b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {2 b^2 x^{3/2} \tan \left (c+d \sqrt {x}\right )}{d} \]
[Out]
Time = 0.54 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {3832, 3803, 3800, 2221, 2611, 6744, 2320, 6724, 3801, 30} \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {a^2 x^2}{2}-\frac {3 i a b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {6 a b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {6 i a b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+i a b x^2+\frac {3 b^2 \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {6 i b^2 \sqrt {x} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {6 b^2 x \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {2 b^2 x^{3/2} \tan \left (c+d \sqrt {x}\right )}{d}-\frac {2 i b^2 x^{3/2}}{d}-\frac {1}{2} b^2 x^2 \]
[In]
[Out]
Rule 30
Rule 2221
Rule 2320
Rule 2611
Rule 3800
Rule 3801
Rule 3803
Rule 3832
Rule 6724
Rule 6744
Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int x^3 (a+b \tan (c+d x))^2 \, dx,x,\sqrt {x}\right ) \\ & = 2 \text {Subst}\left (\int \left (a^2 x^3+2 a b x^3 \tan (c+d x)+b^2 x^3 \tan ^2(c+d x)\right ) \, dx,x,\sqrt {x}\right ) \\ & = \frac {a^2 x^2}{2}+(4 a b) \text {Subst}\left (\int x^3 \tan (c+d x) \, dx,x,\sqrt {x}\right )+\left (2 b^2\right ) \text {Subst}\left (\int x^3 \tan ^2(c+d x) \, dx,x,\sqrt {x}\right ) \\ & = \frac {a^2 x^2}{2}+i a b x^2+\frac {2 b^2 x^{3/2} \tan \left (c+d \sqrt {x}\right )}{d}-(8 i a b) \text {Subst}\left (\int \frac {e^{2 i (c+d x)} x^3}{1+e^{2 i (c+d x)}} \, dx,x,\sqrt {x}\right )-\left (2 b^2\right ) \text {Subst}\left (\int x^3 \, dx,x,\sqrt {x}\right )-\frac {\left (6 b^2\right ) \text {Subst}\left (\int x^2 \tan (c+d x) \, dx,x,\sqrt {x}\right )}{d} \\ & = -\frac {2 i b^2 x^{3/2}}{d}+\frac {a^2 x^2}{2}+i a b x^2-\frac {b^2 x^2}{2}-\frac {4 a b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {2 b^2 x^{3/2} \tan \left (c+d \sqrt {x}\right )}{d}+\frac {(12 a b) \text {Subst}\left (\int x^2 \log \left (1+e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d}+\frac {\left (12 i b^2\right ) \text {Subst}\left (\int \frac {e^{2 i (c+d x)} x^2}{1+e^{2 i (c+d x)}} \, dx,x,\sqrt {x}\right )}{d} \\ & = -\frac {2 i b^2 x^{3/2}}{d}+\frac {a^2 x^2}{2}+i a b x^2-\frac {b^2 x^2}{2}+\frac {6 b^2 x \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {6 i a b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {2 b^2 x^{3/2} \tan \left (c+d \sqrt {x}\right )}{d}-\frac {(12 i a b) \text {Subst}\left (\int x \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^2}-\frac {\left (12 b^2\right ) \text {Subst}\left (\int x \log \left (1+e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^2} \\ & = -\frac {2 i b^2 x^{3/2}}{d}+\frac {a^2 x^2}{2}+i a b x^2-\frac {b^2 x^2}{2}+\frac {6 b^2 x \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {6 i b^2 \sqrt {x} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {6 i a b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 a b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {2 b^2 x^{3/2} \tan \left (c+d \sqrt {x}\right )}{d}+\frac {(6 a b) \text {Subst}\left (\int \operatorname {PolyLog}\left (3,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^3}+\frac {\left (6 i b^2\right ) \text {Subst}\left (\int \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^3} \\ & = -\frac {2 i b^2 x^{3/2}}{d}+\frac {a^2 x^2}{2}+i a b x^2-\frac {b^2 x^2}{2}+\frac {6 b^2 x \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {6 i b^2 \sqrt {x} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {6 i a b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {6 a b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {2 b^2 x^{3/2} \tan \left (c+d \sqrt {x}\right )}{d}-\frac {(3 i a b) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,-x)}{x} \, dx,x,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {\left (3 b^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-x)}{x} \, dx,x,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4} \\ & = -\frac {2 i b^2 x^{3/2}}{d}+\frac {a^2 x^2}{2}+i a b x^2-\frac {b^2 x^2}{2}+\frac {6 b^2 x \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {6 i b^2 \sqrt {x} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {6 i a b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {3 b^2 \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {6 a b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i a b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {2 b^2 x^{3/2} \tan \left (c+d \sqrt {x}\right )}{d} \\ \end{align*}
Time = 1.72 (sec) , antiderivative size = 365, normalized size of antiderivative = 1.33 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {b \left (4 i b d^3 x^{3/2}-2 i a d^4 x^2+6 b d^2 x \log \left (1+e^{-2 i \left (c+d \sqrt {x}\right )}\right )+6 b d^2 e^{2 i c} x \log \left (1+e^{-2 i \left (c+d \sqrt {x}\right )}\right )-4 a d^3 x^{3/2} \log \left (1+e^{-2 i \left (c+d \sqrt {x}\right )}\right )-4 a d^3 e^{2 i c} x^{3/2} \log \left (1+e^{-2 i \left (c+d \sqrt {x}\right )}\right )-6 i d \left (1+e^{2 i c}\right ) \left (-b+a d \sqrt {x}\right ) \sqrt {x} \operatorname {PolyLog}\left (2,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )+3 \left (1+e^{2 i c}\right ) \left (b-2 a d \sqrt {x}\right ) \operatorname {PolyLog}\left (3,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )+3 i a \operatorname {PolyLog}\left (4,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )+3 i a e^{2 i c} \operatorname {PolyLog}\left (4,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )\right )}{d^4 \left (1+e^{2 i c}\right )}+\frac {2 b^2 x^{3/2} \sec (c) \sec \left (c+d \sqrt {x}\right ) \sin \left (d \sqrt {x}\right )}{d}+\frac {1}{2} x^2 \left (a^2-b^2+2 a b \tan (c)\right ) \]
[In]
[Out]
\[\int x \left (a +b \tan \left (c +d \sqrt {x}\right )\right )^{2}d x\]
[In]
[Out]
\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )}^{2} x \,d x } \]
[In]
[Out]
\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int x \left (a + b \tan {\left (c + d \sqrt {x} \right )}\right )^{2}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1290 vs. \(2 (218) = 436\).
Time = 0.51 (sec) , antiderivative size = 1290, normalized size of antiderivative = 4.71 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )}^{2} x \,d x } \]
[In]
[Out]
Timed out. \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int x\,{\left (a+b\,\mathrm {tan}\left (c+d\,\sqrt {x}\right )\right )}^2 \,d x \]
[In]
[Out]